simetrix.openSchematic

simetrix.openSchematic(path: str, options: list[SchematicOptions] | SchematicOptions = SchematicOptions.NONE) Schematic

Opens a schematic from a path and returns a Schematic object.

If the schematic is not already open in the GUI and SchematicOptions.VISIBLE is not specified as an option, it will return a valid Schematic object which references the schematic object stored in the schematic file. Although not open for editing, it is still nevertheless possible to call methods such as Schematic.setPropertyValue() to edit the schematic. The changes will be made to an in-memory image of the schematic and will not be written to the schematic file.

If the schematic at the specified path does not exist or cannot be opened for some reason, an invalid object will be returned. Use the Schematic.valid property to determine if a schematic object is valid.

If SchematicOptions.VISIBLE is specified as an option, the Python scripts’s current working directory weill change to the parent of the schematic opened.

Parameters:
  • path (str) – Path of the schematic to open.

  • options (list[SchematicOptions]) – Options. SchematicOptions.VISIBLE - Schematic will be visible in GUI if not already. SchematicOptions.READONLY - Schematic will be opened readonly.